﻿using System;

namespace IFD2
{
    public partial class LoadBalance : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["ACL"].ToString().IndexOf("DC1") < 0)
                {
                    Response.Redirect("unauthorized.aspx");
                }

                lblAirline.Text = Session["AIRLINE"].ToString();
                lblAirport.Text = Session["DCS_AIRPORT"].ToString();
                if (Request.QueryString["flt_no"] != null)
                {
                    lblFltNo.Text = Request.QueryString["flt_no"];
                    lblAirline.Text = Request.QueryString["airline"];
                }
                else
                {
                    lblError.Text = "Illegal page call!";
                    return;
                }

                if (Request.QueryString["flt_date"] != null)
                {
                    lblFltDate.Text = Request.QueryString["flt_date"];
                }
                else
                {
                    lblError.Text = "Illegal page call!";
                    return;
                }
                GridView1.DataBind();
            }
        }

        protected void lbtnQuery_Click(object sender, EventArgs e)
        {
            GridView1.DataBind();
        }
    }
}